package com.seleniti.enpareja.controller.model.integration.database.domain;

import javax.jdo.annotations.Column;
import javax.jdo.annotations.Extension;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;
import javax.jdo.annotations.Version;
import javax.jdo.annotations.VersionStrategy;
import javax.validation.constraints.NotNull;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
@Version(column = "version", strategy = VersionStrategy.VERSION_NUMBER, extensions = { @Extension(vendorName = "datanucleus", key = "field-name", value = "version") })
public class Settings {

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	@Extension(vendorName = "datanucleus", key = "gae.encoded-pk", value = "true")
	private String settingsId;

	@Column(allowsNull = "false")
	@NotNull
	@Persistent(mappedBy="settings")
	private User ofThisUser;
	
	@Column(allowsNull = "false")
	@NotNull
	private boolean hideShoppingList;

	@Column(allowsNull = "false")
	@NotNull
	private boolean hideHomeTasks;

	@Column(allowsNull = "false")
	@NotNull
	private boolean hideMeals;

	@Column(allowsNull = "false")
	@NotNull
	private boolean hideWorkingShifts;

	@Column(allowsNull = "false")
	@NotNull
	private boolean hideSharedExpenses;

	@Column(allowsNull = "false")
	@NotNull
	private boolean hidePendingShopping;

	@Column(allowsNull = "false")
	@NotNull
	private boolean notifyMeWhenChanges = true;

	protected long version;

	public String getSettingsId() {
		return settingsId;
	}

	public void setSettingsId(String settingsId) {
		this.settingsId = settingsId;
	}

	public User getOfThisUser() {
		return ofThisUser;
	}

	public void setOfThisUser(User ofThisUser) {
		this.ofThisUser = ofThisUser;
	}

	public boolean isHideShoppingList() {
		return hideShoppingList;
	}

	public void setHideShoppingList(boolean hideShoppingList) {
		this.hideShoppingList = hideShoppingList;
	}

	public boolean isHideHomeTasks() {
		return hideHomeTasks;
	}

	public void setHideHomeTasks(boolean hideHomeTasks) {
		this.hideHomeTasks = hideHomeTasks;
	}

	public boolean isHideMeals() {
		return hideMeals;
	}

	public void setHideMeals(boolean hideMeals) {
		this.hideMeals = hideMeals;
	}

	public boolean isHideWorkingShifts() {
		return hideWorkingShifts;
	}

	public void setHideWorkingShifts(boolean hideWorkingShifts) {
		this.hideWorkingShifts = hideWorkingShifts;
	}

	public boolean isHideSharedExpenses() {
		return hideSharedExpenses;
	}

	public void setHideSharedExpenses(boolean hideSharedExpenses) {
		this.hideSharedExpenses = hideSharedExpenses;
	}

	public boolean isHidePendingShopping() {
		return hidePendingShopping;
	}

	public void setHidePendingShopping(boolean hidePendingShopping) {
		this.hidePendingShopping = hidePendingShopping;
	}

	public boolean isNotifyMeWhenChanges() {
		return notifyMeWhenChanges;
	}

	public void setNotifyMeWhenChanges(boolean notifyMeWhenChanges) {
		this.notifyMeWhenChanges = notifyMeWhenChanges;
	}

}
